package com.sina.finance.api.framework.permission;

import org.apache.shiro.authz.Permission;

/**
 * @File name : CvsPermission
 * @Description :
 * @Creator : cuiyong
 * @CreateTime : 15/11/10 14:33
 * @Version : 1.0
 * @Update records:
 * 1.0 15/11/10 by cuiyong: Created
 * All rights served : SINA Corporation
 */
public class CvsPermission implements Permission {
    private String permissions;

    public CvsPermission(String permissions) {
        this.permissions = permissions;
    }

    @Override
    public boolean implies(Permission permission) {

        CvsPermission  cvsPermission = (CvsPermission) permission;
        if (this.permissions.contains(cvsPermission.permissions)) {
            return true;
        }
        return false;
    }
}
